const proxy = require("http-proxy-middleware");
 
module.exports = function(app) {
  app.use(
    proxy("/assets/**", {
      target: "http://127.0.0.1:8888/",
      // target: "http://192.168.0.110:8888/",
      pathRewrite: {
        "/assets": ""
      },
      changeOrigin: true
    })
  );
  app.use(
    proxy("/worker/**", {
      target: "http://127.0.0.1:8890/",
      pathRewrite: {
        "/worker": ""
      },
      changeOrigin: true
    })
  );
};